\chapter{Overview}

Vorpal is a embeddable, prototype-based scripting language with the following features:

\begin{itemize}
\item everything is an object
\item similar to C++ in syntax with these notable differences
	\begin{itemize}
	\item the only form of comment starts with \verb-#- and runs to the end of the line
	\item no semicolons
	\item no operator precedence; left-to-right precedence
	\item no logical expression shortcutting; \verb-1==0 && a.f()- will send \verb-f- message
	\item no self-assignment operators; use \verb-i=i+1- rather than \verb-i++- or \verb-i+=1-
	\end{itemize}
\item compiled to compact bytecode
\item garbage collected
\item objects created by cloning
\item message sending execution model
\end{itemize}

\noindent What makes Vorpal unique?  Doesn't the world already have too many programming languages?  Yes, there certainly are more languages than are needed.  However, simple, embeddable languages are rare.  Lua is probably the best example of that class of language.  Tcl, Guile, tinyscheme, Falcon, and Python are all at least partially designed for embedding.  All of these are great languages, but they all fail to meet one or more of the design objectives below:
\index{languages!Falcon}
\index{languages!Lua}
\index{languages!Squirrel}
\index{languages!Io}

\begin{itemize}
\item written in C++ ---  scriptable C++ projects can be more object-oriented in design.
\item no external dependencies, pure ISO C++ --- easy to add to any C++ project.
\item clean, well-documented  OO design internally --- ease of modification and enhancement.
\item simple language with a small implementation (less-than 3k lines of code) --- minimal impact on host application.
\item easily integrated with C++  --- low development overhead (this objective is not completely met).
\end{itemize}

Two lesser known languages have similar goals.  Falcon is a larger and complex language with many interesting features, and Squirrel is a small Lua inspired language.  Because Vorpal is used in teaching it is also important that the authors have detailed knowledge and appreciation of internal design choices (of course, not all choices are ideal).  

The number of lines of code in a selection of these languages is shown below; lines-of-code (LOC) was calculated by adding the number of semi-colons and opening curly-braces, \verb-{-, in all header and source files in the core of the language (optional libraries and features were not included), using 
\begin{verbatim}
cat *.h *.cpp | grep ";" | wc -l; cat *.cpp *.h | grep "{" | wc -l  
\end{verbatim}
\index{lines of code}

\begin{center}
  \begin{tabular}{ | r | c | c | c | c | }
    \hline
    {\bf language } & {\bf written in } & {\bf ; } & {\bf \{ } & {\bf LOC } \\ \hline
    \hline
    Ruby 1.9.1 & C & 50975 & 16798 & 58k \\ \hline
    Python 2.5.4 & C & 41447 & 12243 & 54k \\ \hline
    Falcon 0.8.14 & C++ & 18712 & 6189 & 25k \\ \hline
    Nickle 2009-02-20 & C & 12214 & 3012 & 15k \\ \hline
    PicoLisp 2.3.5 & C & 7739 & 2206 & 10k \\ \hline
    Io circa 4.2009 & C & 7188 & 3016 & 10k \\ \hline
    Lua 5.1.3 & C & 6829 & 1998 & 9k \\ \hline
    Squirrel 2.2.2 & C++ & 4747 & 1555 & 6k \\ \hline
    TinyScheme 1.39 & C & 2274 & 832 & 3.1k \\ \hline
    {\bf Vorpal 0.2} & C++ & 1785 & 775 & {\bf 2.5k } \\ \hline
  \end{tabular}
\end{center}

The ability to modify and ``control'' the language features, testing and build environment, and implementation are critical to teaching and research goals which only the authors are likely to benefit from or appreciate.  Aside for the shear novelty of creating a language, it is this ownership and familiarity which lead to the existence of languages with overlapping characteristics.  Hopefully, our experiments and ideas will help advance programming/script language design in some small way.
